This script will perform a reverse lookup for all selected images that have
GPS coordinates stored in their XMP data.
A reverse lookup means that the script will try to determine some real information
based on the location information (latitude/longitude). The info that will be
retrieved (if possible) is:
Location (street + number)
City
State
Country
CountryCode (3 positions)
Date first version: 2008-07-21
Version: 1.0
Date version: 2008-07-21
Author: Hertwig van Zwietering
}
var
AGps: TGPSReadWrite;
AXmp: TXMP;
ACatItem: TCatalogItem;
ALat, ALon, AAlt: Double;
AStamp: TDateTime;
ALocation: TidElement;
AHit: Integer;
begin
if not Ask ('Are you sure you want to perform a reverse lookup for the selected images? This will only affect images that have GPS coordinates stored in their XMP.') then
exit;
// initialize the progress info
Progress.Cancel := False;
Progress.ProgressBar := True;
Progress.UseProgress;
Progress.Max := Selected.Count;
Progress.Show;
// reset the counter that will count all images that got "handled"